<extend name="Public/base" />

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>钩子列表</h2>
    </div>
    <div class="cf">
        <?php if (IS_ROOT): ?>
            <a class="btn" href="{:U('addhook')}">新 增</a>
        <?php endif ?>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>名称</th>
                    <th>描述</th>
                    <th>类型</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="list" id="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td><a href="{:U('edithook?id='.$vo['id'])}">{$vo.name}</a></td>
                        <td>{$vo.description}</td>
                        <td>{$vo.type_text}</td>
                        <td>
                            <a title="编辑" href="{:U('edithook?id='.$vo['id'])}">编辑</a>
                            <a class="confirm ajax-get" title="删除" href="{:U('delhook?id='.$vo['id'])}">删除</a>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
</block>
